import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
import { CustomerSimpleChild } from '../../customer-simple-child/entities/customer-simple-child.entity';

@Entity('customer_simple_manage')
export class CustomerSimpleManage {
  @PrimaryGeneratedColumn()
  _Identify: number;

  @Column()
  _Locked: boolean;

  @Column()
  _SortKey: number;

  @Column({ type: 'nvarchar', length: 30 })
  manageid: string;

  @Column({ type: 'datetime' })
  date: Date;

  @Column()
  operate: string;

  @Column()
  customername: string;

  @Column()
  simpledetail: string;

  @Column()
  simpletype: string;

  @Column()
  simpleposition: string;

  @Column()
  picture: string;

  @Column()
  quoteid: string;

  @OneToMany(
    () => CustomerSimpleChild,
    (customerSimpleChild) => customerSimpleChild.manage,
  )
  children: CustomerSimpleChild[];
}
